/********************************************************************
	created:	2011/04/10
	created:	10:4:2011   22:58
	filename: 	d:\Work\Job\trunk\Speed\EventManager.cpp
	file path:	d:\Work\Job\trunk\Speed
	file base:	EventManager
	file ext:	cpp
	author:		liang
	
	purpose:	
*********************************************************************/
#include "EventManager.h"

EventMgr* EventMgr::s_pInstance = NULL;

EventMgr* EventMgr::GetInstance()
{
	if(NULL == s_pInstance)
		s_pInstance = new EventMgr();

	return s_pInstance;
}

void EventMgr::Release()
{
	if (s_pInstance)
	{
		delete s_pInstance;
		s_pInstance = NULL;
	}
}

EventMgr::EventMgr()
{

}

EventMgr::~EventMgr()
{
	m_EventQue.clear();
}

bool EventMgr::PushMessage(QEvent* pEvnet)
{
    mutex.lock();
	m_EventQue.push_back(pEvnet);
    mutex.unlock();
	return true;
}

void EventMgr::Update()
{

}